<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Zombie Navigator: Class: Window</title><script src="scripts/prettify/prettify.js"> </script><link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"><link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"></head><body><div id="main"><h1 class="page-title">Class: Window</h1><section><header><h2><span class="ancestors"><a href="module-zombie_webbrowser.html">zombie/webbrowser</a>~</span>
        Window
</h2></header><article><div class="container-overview"><h4 class="name" id="Window"><span class="type-signature">(protected) </span>new Window<span class="signature">()</span><span class="type-signature"></span></h4><div class="description">
    A browser window, or a tab
</div><dl class="details"><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li><a>webbrowser.jsdoc</a>, <a>line 83</a></li></ul></dd></dl><h5>Example</h5><pre class="prettyprint"><code>require('zombie/webbrowser').openPrivateWindow('about:')
.then(window => {
	console.log(window.uri);
})
.catch(e => {
	console.exception(e); // failed
});
</code></pre></div><h3 class="subsection-title">Members</h3><h4 class="name" id="isPrivate"><span class="type-signature">(readonly) </span>isPrivate<span class="type-signature"> :bool</span></h4><div class="description">
    Whether this window is private (Private Browsing)
</div><h5>Type:</h5><ul><li><span class="param-type">bool</span></li></ul><dl class="details"><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li><a>webbrowser.jsdoc</a>, <a>line 90</a></li></ul></dd></dl><h4 class="name" id="uri"><span class="type-signature"></span>uri<span class="type-signature"> :string</span></h4><div class="description">
    The URI of the window
</div><h5>Type:</h5><ul><li><span class="param-type">string</span></li></ul><dl class="details"><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li><a>webbrowser.jsdoc</a>, <a>line 102</a></li></ul></dd></dl><h5>Example</h5><pre class="prettyprint"><code>// writable since 0.4.0
window.uri = 'about:';
window.waitForReload()
.then(...)
</code></pre><h3 class="subsection-title">Methods</h3><h4 class="name" id="close"><span class="type-signature"></span>close<span class="signature">()</span><span class="type-signature"> &rarr; {Promise}</span></h4><div class="description">
    Close the window
</div><dl class="details"><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li><a>webbrowser.jsdoc</a>, <a>line 110</a></li></ul></dd></dl><h5>Returns:</h5><dl><dt>
        Type
</dt><dd><span class="param-type">Promise</span></dd></dl><h4 class="name" id="reload"><span class="type-signature"></span>reload<span class="signature">()</span><span class="type-signature"> &rarr; {Promise}</span></h4><div class="description">
    Reload this tab
</div><dl class="details"><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li><a>webbrowser.jsdoc</a>, <a>line 139</a></li></ul></dd></dl><h5>Returns:</h5><dl><dt>
        Type
</dt><dd><span class="param-type">Promise</span></dd></dl><h4 class="name" id="runScript"><span class="type-signature"></span>runScript<span class="signature">(callback, &hellip;args)</span><span class="type-signature"> &rarr; {Promise}</span></h4><div class="description">
    Run a script inside this tab
</div><h5>Parameters:</h5><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>callback</code></td><td class="type"><span class="param-type">function</span></td><td class="attributes"></td><td class="description last">The script to run</td></tr><tr><td class="name"><code>args</code></td><td class="type"><span class="param-type">*</span></td><td class="attributes">
                    &lt;repeatable><br></td><td class="description last">Passed to the callback</td></tr></tbody></table><dl class="details"><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li><a>webbrowser.jsdoc</a>, <a>line 132</a></li></ul></dd></dl><h5>Returns:</h5><div class="param-desc">
    Resolves to the result of the callback
</div><dl><dt>
        Type
</dt><dd><span class="param-type">Promise</span></dd></dl><h5>Example</h5><pre class="prettyprint"><code>let promise = w.runScript(function (arg1, arg2) {
	console.log(document.title);
	return 'result';
}, 'arg1', 'arg2');
</code></pre><h4 class="name" id="waitForReload"><span class="type-signature"></span>waitForReload<span class="signature">()</span><span class="type-signature"> &rarr; {Promise}</span></h4><div class="description">
    Wait until the tab is reloaded
</div><dl class="details"><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li><a>webbrowser.jsdoc</a>, <a>line 117</a></li></ul></dd></dl><h5>Returns:</h5><dl><dt>
        Type
</dt><dd><span class="param-type">Promise</span></dd></dl></article></section></div><nav><h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-zombie_async.html">zombie/async</a></li><li><a href="module-zombie_webbrowser.html">zombie/webbrowser</a></li><li><a href="module-zombie_zombie.html">zombie/zombie</a></li></ul><h3>Classes</h3><ul><li><a href="module-zombie_webbrowser-Window.html">Window</a></li></ul><h3>Namespaces</h3><ul><li><a href="module-zombie_zombie-console.html">console</a></li><li><a href="module-zombie_zombie-zombie.html">zombie</a></li></ul></nav><br class="clear"><footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.3</a></footer><script> prettyPrint(); </script></body></html>
